package com.lagou.sale.controller;

import com.lagou.sale.pojo.PayResult;
import com.lagou.sale.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;

    @PostMapping("/pay/{id}")
    public PayResult payOrder(@PathVariable("id") long orderId) {
        return orderService.payOrder(orderId);
    }

}
